﻿<prism:FlyoutView x:Class="Sumc.Client.ModernUI.Views.NewsFlyout"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:local="using:Sumc.Client.ModernUI.Views"
                  xmlns:prism="using:Microsoft.Practices.Prism.StoreApps"
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                  mc:Ignorable="d"
                  prism:ViewModelLocator.AutoWireViewModel="True">

    <Grid VerticalAlignment="Stretch"
              Background="#d1d1d1">

        <!-- Root grid definition -->
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- Header area for panel -->
        <Grid Grid.Row="0"
              Background="{StaticResource DefaultItemBackground}">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <TextBlock x:Uid="PrivacyPolicyTitle"
                       Grid.Column="1"
                       Margin="20,40,0,10"
                       Width="550"
                       FontFamily="Segoe UI"
                       FontWeight="SemiLight"
                       FontSize="24"
                       TextWrapping="Wrap"
                       VerticalAlignment="Center"
                       Text="{Binding Title}"/>

            <TextBlock FontSize="12"
                       Grid.Row="1"
                       Margin="60,0,0,30"
                       Foreground="{StaticResource DefaultDarkBrush}"
                       Text="{Binding Date}" />
        </Grid>

        <ProgressBar Grid.Row="1"
                     IsIndeterminate="{Binding LoadingData}"
                     Width="250" 
                     Height="30"
                     VerticalAlignment="Top"
                     Visibility="{Binding LoadingData, Converter={StaticResource BooleanToVisibilityConverter}}"
                     Style="{StaticResource ProgressBar}" />

        <ScrollViewer ZoomMode="Disabled" Grid.Row="2"
                          VerticalScrollBarVisibility="Auto">
            <StackPanel
                    Margin="50,50,50,30">
                <TextBlock TextWrapping="Wrap"
                       FontSize="14"
                       Foreground="{StaticResource DefaultDarkBrush}"
                       Text="{Binding Content}" />
            </StackPanel>
        </ScrollViewer>
    </Grid>
</prism:FlyoutView>
